Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/osidb 3129 multi flaws related trackers #377

Open
wants to merge 47 commits into
base: main
Choose a base branch
from

Conversation

superbuggy
Copy link
Collaborator

[OSIDB-ID] [Title]

Checklist:

  • Commits consolidated
  • Changelog updated
  • Test cases added/updated
  • Jira ticket updated

Summary:

[Replace with a brief summary of the changes introduced by this PR.]

Changes:

[Replace with a detailed description of the changes made in this PR, including any new features, enhancements, bug fixes, or refactorings.]

Considerations:

[Replace with any additional considerations, notes, or instructions for reviewers.]

@superbuggy superbuggy marked this pull request as ready for review August 14, 2024 13:25
@superbuggy superbuggy force-pushed the feature/OSIDB-3129-multi-flaws-related-trackers branch from 50bdf0e to 609f34e Compare August 14, 2024 15:43
@superbuggy superbuggy force-pushed the feature/OSIDB-3129-multi-flaws-related-trackers branch from 609f34e to 2e07344 Compare September 4, 2024 16:57
@superbuggy superbuggy force-pushed the feature/OSIDB-3129-multi-flaws-related-trackers branch from cacdd1e to 7284066 Compare September 13, 2024 15:50
🐛 Remove merge artefacts

🐛 Fix check for affect presence

🐛 Fix unmount cleanup function on loading directive

The cause seems to have been 'patch-style' updates to pieces of the DOM that were done via hot-reloading.

♻️ Ensure type signature

🚧 Request trackers for related flaws

OSIDB endpoint seems to be returning only trackers for affect of current flaw.

✨ Provide new Tabs component with dynamic slot scopes

🚧 Provide UI for multiflaws

Filing trackers doesn't work due to module_components from OSIDB's tracker querying endpoint only having an association with a single affect.

♻️ Unpack object error values from OSIDB error response data

🚧 Synchronize tracker selections

💄 Use tracker theme color for trackers manager

💄 Use tracker theme color for trackers manager

💄  Use tracker theme color on related Flaw tabs

💄  Refine trackers manager layout

✨ Connect filing for multiple flaws

🔥 Remove unused file

🏷️ Improve type safety
💄 Make untrackable affects alert full-screen

🔥 Remove unused functions

💄  Refine trackers manager layout
@superbuggy superbuggy force-pushed the feature/OSIDB-3129-multi-flaws-related-trackers branch from 213bae7 to 5cdc3a6 Compare September 17, 2024 13:43
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This probably was reverted during merge. it was change don #387

Copy link
Collaborator

@C-Valen C-Valen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Friendly reminder on the points commented on the code review meeting:

  • Style issue in some local instances (e.g. trackers table background disappear)
  • Add tracker button (file trackers for individual affect) not currently working
  • isSelectableFn possible renaming?
  • Double scroll on tracker manager lists?

src/components/FlawAffects/useAffectSelections.ts Outdated Show resolved Hide resolved
src/components/FlawAffects/useAffectSelections.ts Outdated Show resolved Hide resolved
Comment on lines 40 to 52
function filterAffects(affects: ZodAffectType[]): ZodAffectType[] {
return affects.filter((affect) => {
const matchesSelectedModules =
selectedModules.value.length === 0 || selectedModules.value.includes(affect.ps_module);
const matchesAffectednessFilter =
affectednessFilter.value.length === 0 || affectednessFilter.value.includes(affect.affectedness ?? '');
const matchesResolutionFilter =
resolutionFilter.value.length === 0 || resolutionFilter.value.includes(affect.resolution ?? '');
const matchesImpactsFilter =
impactFilter.value.length === 0 || impactFilter.value.includes(affect.impact ?? '');
return matchesSelectedModules && matchesAffectednessFilter && matchesResolutionFilter && matchesImpactsFilter;
});
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Possible suggestion to follow DRY principle

Suggested change
function filterAffects(affects: ZodAffectType[]): ZodAffectType[] {
return affects.filter((affect) => {
const matchesSelectedModules =
selectedModules.value.length === 0 || selectedModules.value.includes(affect.ps_module);
const matchesAffectednessFilter =
affectednessFilter.value.length === 0 || affectednessFilter.value.includes(affect.affectedness ?? '');
const matchesResolutionFilter =
resolutionFilter.value.length === 0 || resolutionFilter.value.includes(affect.resolution ?? '');
const matchesImpactsFilter =
impactFilter.value.length === 0 || impactFilter.value.includes(affect.impact ?? '');
return matchesSelectedModules && matchesAffectednessFilter && matchesResolutionFilter && matchesImpactsFilter;
});
}
const matchAffectFilter = <T extends Ref>(filter: T, field: string) =>
filter.value.length === 0 || filter.value.includes(field ?? '');
function filterAffects(affects: ZodAffectType[]): ZodAffectType[] {
return affects.filter(affect =>
matchAffectFilter(selectedModules, affect.ps_module)
&& matchAffectFilter(affectednessFilter, affect.affectedness)
&& matchAffectFilter(resolutionFilter, affect.resolution)
&& matchAffectFilter(impactFilter, affect.impact),
);
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has been fixed already, so another rebase? 😓

src/composables/useFlawAffectsModel.ts Outdated Show resolved Hide resolved
src/scss/bootstrap-overrides.scss Outdated Show resolved Hide resolved
src/scss/bootstrap-overrides.scss Outdated Show resolved Hide resolved
src/services/FlawService.ts Outdated Show resolved Hide resolved
src/types/index.ts Outdated Show resolved Hide resolved
src/utils/helpers.ts Outdated Show resolved Hide resolved
@MrMarble MrMarble removed the request for review from tboyetteredhat September 19, 2024 11:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants